#pragma once
#ifndef _ASIO_ASYNC_CONNECTOR_H_
#define _ASIO_ASYNC_CONNECTOR_H_
#include "Netbase.h"
#include <boost\asio.hpp>
#include <boost\bind.hpp>
#include <boost\thread.hpp>

using namespace boost;
using namespace boost::asio;

namespace XGC
{
	namespace net
	{
		void StopConnector( io_service* service );

		bool AsyncConnect( io_service& service, const char* pszAddress, short port, IMessageQueue* pMessageQueue, _uint32 nTimeout = 0 );

		bool DirectConnect( io_service& service, const char* pszAddress, short port, IMessageQueue* pMessageQueue, _uint32 nTimeout = 0 );
	};
};

#endif //_ASIO_ASYNC_CONNECTOR_H_